package com.share.example.selenium.web;

import com.share.common.common.Page;
import com.share.common.common.Result;
import com.share.example.selenium.model.vo.BaseConfPageReq;
import com.share.example.selenium.model.vo.PromoteDetailPageReq;
import com.share.example.selenium.service.IBaseConfService;
import com.share.example.selenium.service.IPromoteDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class PromoteController {
    @Autowired
    private IPromoteDetailService promoteDetailService;

    @Autowired
    private IBaseConfService baseConfService;

    @RequestMapping("/baseConf/pageList")
    public Result pageList(BaseConfPageReq req) {
        Page page = baseConfService.pageList(req);
        return Result.success(page);
    }

    @RequestMapping("/promoteDetail/pageList")
    public Result pageList(PromoteDetailPageReq req) {
        Page page = promoteDetailService.pageList(req);
        return Result.success(page);
    }

}
